<?php
/**
 * 订单查询
 */
if (!defined('IN_CRONLITE')) die();
$title = '订单查询 - ' . $conf['sitename'];
include 'template/cloud/header.php';
?>
<style>
    input, select {
        border: none !important;
        border-bottom: solid #f4f4f4 1px !important;
        outline: none !important)
    }

    .qt-header {
        height: 4em;
        line-height: 4em;
    }

    .qt-header > input {
        height: 2.5em;
        width: 100%;
        border: none;
        text-indent: 2.5em;
        border-radius: 0.5em;
        font-size: 0.9em;
    }

    .qt-header > span {
        position: absolute;
        margin-left: 0.8em;
        font-size: 0.9em;
    }

    .qt-card {
        box-shadow: 0px 0px 6px #eee;
        border-radius: 0.5em;
    }

    .qt-card img {
        width: 6em;
        max-width: 100%;
        height: 6em;
        border-radius: 0.5em;
        box-shadow: 3px 3px 16px #eee;
    }

    .qt-btn {
        border-radius: 0.5em;
        border: solid 1px #eee;
    }
</style>
<div class="content__inner">
    <!-- 订单查询 -->
    <div class="card">
        <?php if (!isset($conf['notice_check'])) { ?>
            <div class="card-body">
                <span class="label label-primary">待处理</span> 说明正在努力提交到服务器！<p></p>
                <p></p><span class="label label-success">已完成</span> 并不是刷完了只是开始刷了！<p></p>
                <p></p><span class="label label-warning">处理中</span> 已经开始为您开单 请耐心等！<p></p>
                <p></p><span class="label label-danger">有异常</span> 下单信息有误 联系客服处理！
            </div>
        <?php } elseif (isset($conf['notice_check'])) { ?>
            <div class="card-body">
                <?= $conf['notice_check'] ?>
            </div>
        <?php } ?>

    </div>
    <div class="card" style="opacity: 0.9">
        <div class="card-body" style="padding: 0">
            <div class="layui-card">
                <div class="layui-card-header qt-header">
                            <span class="layui-icon layui-icon-search" style="cursor: pointer"
                                  onclick="OrderManagement.OrderQuery('OrderAll',$('#query').val())"></span>
                    <input type="text" id="query"  onkeydown="if(event.keyCode==13){OrderManagement.OrderQuery('OrderAll',$('#query').val())}" placeholder="搜索我的订单" autocomplete="off">
                </div>
                <div class="layui-card-body" style="padding: 0;color: black">
                    <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
                        <ul class="layui-tab-title" style="text-align: center">
                            <li class="layui-this">已提交订单</li>
                            <li>待提交订单</li>
                            <li>订单查询</li>
                        </ul>
                        <div class="layui-tab-content"
                             style="padding: 1em;padding-bottom: 3em;overflow:hidden;overflow-y: auto;height: auto">
                            <div class="layui-tab-item layui-show  layui-row layui-col-space16" id="order_all"></div>
                            <div class="layui-tab-item layui-row layui-col-space16" id="order_a"></div>
                            <div class="layui-tab-item">
                                <div class="layui-card">
                                    <div class="layui-card-body">
                                        <div class="layui-form">
                                            <div class="layui-form-item">
                                                <label class="layui-form-label">请填写</label>
                                                <div class="layui-input-block">
                                                    <input type="text" id="vae"
                                                           onkeydown="if(event.keyCode==13){merchandise.query_sep($('#vae').val())}"
                                                           required lay-verify="required" placeholder="下单时所输入的信息！"
                                                           autocomplete="off"
                                                           class="layui-input">
                                                </div>
                                            </div>
                                            <button class="layui-btn layui-btn layui-btn-normal layui-btn-fluid layui-btn-radius layui-btn-sm"
                                                    style="background-color: white;color: #666;border: 1px solid #000"
                                                    id="submit_query">
                                                查询未绑定用户的订单
                                            </button>
                                            <div id="content_query"></div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <?php include 'template/cloud/bottom.php'; ?>
    <script>logo = "<?=$conf['logo']?>"</script>
    <script src="<?php echo $cdnserver; ?>assets/js/main.js?var=<?= $accredit['versions'] ?>"></script>
    <script src="/template/cloud/template.js?var=<?= $accredit['versions'] ?>"></script>
    <script>
        OrderManagement.OrderQuery('OrderAll'); // 进入页面查询全部订单
    </script>